﻿using System;
using MyFloridaHouse.libSvUtilities.Commands;

namespace MyFloridaHouse.libSvOpenDistricts.ViewModel
{
    public partial class ViewModelBase
    {
        #region Declare Commands

        public DelegateCommand CmdBuildLockDistrict { get; set; }
        public DelegateCommand CmdBuildLockDistrictAll { get; set; }
        public DelegateCommand CmdBuildRedo { get; set; }
        public DelegateCommand CmdBuildUndo { get; set; }
        public DelegateCommand CmdBuildTargetUnassigned { get; set; }

        public DelegateCommand CmdBuildCut { get; set; }
        public DelegateCommand CmdBuildCopy { get; set; }
        public DelegateCommand CmdBuildPaste { get; set; }
        public DelegateCommand CmdBuildShaded { get; set; }

        public DelegateCommand CmdConfig { get; set; }
        public DelegateCommand CmdConfigCancel { get; set; }
        public DelegateCommand CmdConfigOK { get; set; }

        public DelegateCommand CmdDistrictRenumber { get; set; }
        public DelegateCommand CmdDistrictSelect { get; set; }
        public DelegateCommand CmdDistrictConfig { get; set; }


        public DelegateCommand CmdFileNew { get; set; }
        public DelegateCommand CmdFileSave { get; set; }
        public DelegateCommand CmdFileImport { get; set; }
        public DelegateCommand CmdFileImportCloud { get; set; }
        public DelegateCommand CmdFileSubmit { get; set; }


        //public DelegateCommand CmdFileNewCancel { get; set; }
        //public DelegateCommand CmdFileNewOK { get; set; }

        //public DelegateCommand CmdFileOpen { get; set; }
    //    public DelegateCommand CmdFileOpenCancel { get; set; }
    //    public DelegateCommand CmdFileOpenOK { get; set; }

        public DelegateCommand CmdFilePrint { get; set; }
        public DelegateCommand CmdFilePrintCancel { get; set; }
        public DelegateCommand CmdFilePrintOK { get; set; }

        public DelegateCommand CmdPrintMap { get; set; }
        //public DelegateCommand CmdPrintMapCancel { get; set; }
        public DelegateCommand CmdPrintMapOK { get; set; }

        public DelegateCommand CmdReportsBatchPDF { get; set; }
        public DelegateCommand CmdReportsBatchPDFClose { get; set; }
        public DelegateCommand CmdReportsDistrictPlanPDF { get; set; }
        public DelegateCommand CmdReportsDistrictPlanPDFSave { get; set; }
        public DelegateCommand CmdReportsPDFCloseViewer { get; set; }
        
        //public DelegateCommand CmdFileSave { get; set; }

        //public DelegateCommand CmdIsolatedStorageDeleteFile { get; set; }

        //public DelegateCommand CmdFileSaveAs { get; set; }
        //public DelegateCommand CmdFileSaveAsCancel { get; set; }
        //public DelegateCommand CmdFileSaveAsOK { get; set; }

        public DelegateCommand CmdToolsDistance { get; set; }
        public DelegateCommand CmdToolsGetUnassignedRegions { get; set; }
        public DelegateCommand CmdToolsGetNonContiguousDistricts { get; set; }

        public DelegateCommand CmdViewFull { get; set; }
        public DelegateCommand CmdViewNext { get; set; }
        public DelegateCommand CmdViewPrev { get; set; }

        public DelegateCommand CmdToggleShowRightMenu { get; set; }
        public DelegateCommand CmdToggleShowLeftMenu { get; set; }
        public DelegateCommand CmdToggleShowBing { get; set; }
        public DelegateCommand CmdToggleShowOpenStreetMaps { get; set; }
        public DelegateCommand CmdToggleShowDistrictLayer { get; set; }

        public DelegateCommand CmdMiniMapMouseClick { get; set; }

        public DelegateCommand CmdHelpAbout { get; set; }
        public DelegateCommand CmdHelpAboutOK { get; set; }

        public DelegateCommand CmdPrefDistrict { get; set; }
        public DelegateCommand CmdPrefCriteria { get; set; }

        #endregion

        #region Initialize Commands
        public void IntializeCommands()
        {
            CmdBuildLockDistrict = DelegateCommand.CreateCommand(this, CmdBuildLockDistrictExecute, CmdBuildLockDistrictCanExecute);
            CmdBuildLockDistrictAll = DelegateCommand.CreateCommand(this, CmdBuildLockDistrictAllExecute, CmdBuildLockDistrictAllCanExecute);
            CmdBuildRedo = DelegateCommand.CreateCommand(this, CmdBuildRedoExecute, CmdBuildRedoCanExecute);
            CmdBuildUndo = DelegateCommand.CreateCommand(this, CmdBuildUndoExecute, CmdBuildUndoCanExecute);
            CmdBuildTargetUnassigned = DelegateCommand.CreateCommand(this, CmdBuildTargetUnassignedExecute, CmdBuildTargetUnassignedCanExecute);

            CmdDistrictRenumber = DelegateCommand.CreateCommand(this, CmdDistrictRenumberExecute, CmdDistrictRenumberCanExecute);
            CmdDistrictSelect = DelegateCommand.CreateCommand(this, CmdDistrictSelectExecute, CmdDistrictSelectCanExecute);
            CmdDistrictConfig = DelegateCommand.CreateCommand(this, CmdDistrictConfigExecute, CmdDistrictConfigCanExecute);

            CmdBuildCut = DelegateCommand.CreateCommand(this, CmdBuildCutExecute, CmdBuildCutCanExecute);
            CmdBuildCopy = DelegateCommand.CreateCommand(this, CmdBuildCopyExecute, CmdBuildCopyCanExecute);
            CmdBuildPaste = DelegateCommand.CreateCommand(this, CmdBuildPasteExecute, CmdBuildPasteCanExecute);

            CmdBuildShaded = DelegateCommand.CreateCommand(this, CmdBuildShadedExecute, CmdBuildShadedCanExecute);

            CmdFileNew = DelegateCommand.CreateCommand(this, CmdFileNewExecute, CmdFileNewCanExecute);
            CmdFileSave = DelegateCommand.CreateCommand(this, CmdFileSaveExecute, CmdFileExportCanExecute);
            CmdFileImport = DelegateCommand.CreateCommand(this, CmdFileImportExecute, CmdFileImportCanExecute);
            CmdFileImportCloud = DelegateCommand.CreateCommand(this, CmdFileImportCloudExecute, CmdFileImportCloudCanExecute);
            CmdFileSubmit = DelegateCommand.CreateCommand(this, CmdFileSubmitExecute, CmdFileSubmitCanExecute);

            
            //CmdFileOpen = DelegateCommand.CreateCommand(this, CmdFileOpenExecute, CmdFileOpenCanExecute);
            //CmdFileOpenCancel = DelegateCommand.CreateCommand(this, CmdFileOpenCancelExecute, CmdFileOpenCancelCanExecute);
            //CmdFileOpenOK = DelegateCommand.CreateCommand(this, CmdFileOpenOKExecute, CmdFileOpenOKCanExecute);

            CmdFilePrint = DelegateCommand.CreateCommand(this, CmdFilePrintExecute, CmdFilePrintCanExecute);
            CmdFilePrintCancel = DelegateCommand.CreateCommand(this, CmdFilePrintCancelExecute, CmdFilePrintCancelCanExecute);
            CmdFilePrintOK = DelegateCommand.CreateCommand(this, CmdFilePrintOKExecute, CmdFilePrintOKCanExecute);

            CmdPrintMap = DelegateCommand.CreateCommand(this, CmdPrintMapExecute, CmdPrintMapCanExecute);
            //CmdPrintMapCancel = DelegateCommand.CreateCommand(this, CmdPrintMapCancelExecute, CmdPrintMapCancelCanExecute);
            CmdPrintMapOK = DelegateCommand.CreateCommand(this, CmdPrintMapOKExecute, CmdPrintMapOKCanExecute);

            CmdReportsBatchPDF = DelegateCommand.CreateCommand(this, CmdReportsBatchPDFExecute, CmdReportsBatchPDFCanExecute);
            CmdReportsBatchPDFClose = DelegateCommand.CreateCommand(this, CmdReportsBatchPDFCloseExecute, CmdReportsBatchPDFCloseCanExecute);
            CmdReportsDistrictPlanPDF = DelegateCommand.CreateCommand(this, CmdReportsDistrictPlanPDFExecute, CmdReportsDistrictPlanPDFCanExecute);
            CmdReportsDistrictPlanPDFSave = DelegateCommand.CreateCommand(this, CmdReportsDistrictPlanPDFSaveExecute, CmdReportsDistrictPlanPDFSaveCanExecute);
                                                                                
            //CmdFileSave = DelegateCommand.CreateCommand(this, CmdFileSaveExecute, CmdFileSaveCanExecute);

            //CmdIsolatedStorageDeleteFile = DelegateCommand.CreateCommand(this, CmdIsolatedStorageDeleteFileExecute, CmdIsolatedStorageDeleteFileCanExecute);

            //CmdFileSaveAs = DelegateCommand.CreateCommand(this, CmdFileSaveAsExecute, CmdFileSaveAsCanExecute);
            //CmdFileSaveAsCancel = DelegateCommand.CreateCommand(this, CmdFileSaveAsCancelExecute, CmdFileSaveAsCancelCanExecute);
            //CmdFileSaveAsOK = DelegateCommand.CreateCommand(this, CmdFileSaveAsOKExecute, CmdFileSaveAsOKCanExecute);

            CmdToolsDistance = DelegateCommand.CreateCommand(this, CmdToolsDistanceExecute, CmdToolsDistanceCanExecute);
            CmdToolsGetUnassignedRegions = DelegateCommand.CreateCommand(this, CmdToolsGetUnassignedRegionsExecute, CmdToolsGetUnassignedRegionsCanExecute);
            CmdToolsGetNonContiguousDistricts = DelegateCommand.CreateCommand(this, CmdToolsGetNonContiguousDistrictsExecute, CmdToolsGetNonContiguousDistrictsCanExecute);

            CmdViewFull = DelegateCommand.CreateCommand(this, CmdViewFullExecute, CmdViewFullCanExecute);
            CmdViewNext = DelegateCommand.CreateCommand(this, CmdViewNextExecute, CmdViewNextCanExecute);
            CmdViewPrev = DelegateCommand.CreateCommand(this, CmdViewPrevExecute, CmdViewPrevCanExecute);

            CmdToggleShowRightMenu = DelegateCommand.CreateCommand(this, CmdToggleShowRightMenuExecute, CmdToggleShowRightMenuCanExecute);
            CmdToggleShowLeftMenu = DelegateCommand.CreateCommand(this, CmdToggleShowLeftMenuExecute, CmdToggleShowLeftMenuCanExecute);
            CmdToggleShowBing = DelegateCommand.CreateCommand(this, CmdToggleShowBingExecute, CmdToggleShowBingCanExecute);
            CmdToggleShowOpenStreetMaps = DelegateCommand.CreateCommand(this, CmdToggleShowOpenStreetMapsExecute, CmdToggleShowOpenStreetMapsCanExecute);

            CmdMiniMapMouseClick = DelegateCommand.CreateCommand(this, CmdMiniMapMouseClickExecute, CmdMiniMapMouseClickCanExecute);

            CmdHelpAbout = DelegateCommand.CreateCommand(this, CmdHelpAboutExecute, CmdHelpAboutCanExecute);
            CmdHelpAboutOK = DelegateCommand.CreateCommand(this, CmdHelpAboutOKExecute, CmdHelpAboutOKCanExecute);

            CmdPrefDistrict = DelegateCommand.CreateCommand(this, CmdPrefDistrictExecute, CmdPrefDistrictCanExecute);
            CmdPrefCriteria = DelegateCommand.CreateCommand(this, CmdPrefCriteriaExecute, CmdPrefCriteriaCanExecute);
        }
        #endregion

    }
}
